package org.wangzx.framework.security.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.wangzx.framework.security.constant.SecurityConstant;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by WangZX on 2018/7/12.
 */
@ConfigurationProperties(prefix = "wzx.security", ignoreUnknownFields = true)
public class SecurityProperties {

    private String permitUrls = "";

    private Map<String,String> roleUrls = new HashMap();

    private String loginType = SecurityConstant.LOGIN_TYPE_JWT;

    private String encoderType = SecurityConstant.PASSWORD_ENCODER_BCrypt;

    private Long tokenExpiryTime = 14 * 24 * 60 * 60 * 1000L;

    public String getPermitUrls() {
        return permitUrls;
    }

    public void setPermitUrls(String permitUrls) {
        this.permitUrls = permitUrls;
    }

    public String getLoginType() {
        return loginType;
    }

    public void setLoginType(String loginType) {
        this.loginType = loginType;
    }

    public Map<String, String> getRoleUrls() {
        return roleUrls;
    }

    public void setRoleUrls(Map<String, String> roleUrls) {
        this.roleUrls = roleUrls;
    }

    public String getEncoderType() {
        return encoderType;
    }

    public void setEncoderType(String encoderType) {
        this.encoderType = encoderType;
    }

    public Long getTokenExpiryTime() {
        return tokenExpiryTime;
    }

    public void setTokenExpiryTime(Long tokenExpiryTime) {
        this.tokenExpiryTime = tokenExpiryTime;
    }
}
